close(mod, bool, bool)

Anybody know what the 2nd bool parameter to "close(mod)" does?

"close(mod, bool)"
The first bool parameter indicates whether the user should be prompted to save the module should it need saving; "false" is a pretty handy value for long running or batch scripts that would otherwise wait for user input instead of finishing.

"close(mod, bool, bool)"
I played with the 2nd parameter but could not get it to make the close behave differently; such as preventing the close when it indeed needs saving or having something to do with Shared mode. I made a feeble effort at associating it with the "lock" stuff, such as closing the module but retaining a lock on it (thus preventing someone waiting for the module to become available from grabbing the module), but I was unable to do so. I doubt it has anything to do with suppressing close-module triggers.

  • Louie

llandale - Mon May 30 12:44:24 EDT 2011

Re: close(mod, bool, bool)
a_vestlin - Tue May 31 01:55:03 EDT 2011

Hi

The second parameter is about telling the user when the current view has changed.

bool close(Module m, bool bAskToSaveModule, bool bWarnForViewChanges);


/Anders

Re: close(mod, bool, bool)
llandale - Tue May 31 12:53:07 EDT 2011

a_vestlin - Tue May 31 01:55:03 EDT 2011

Hi

The second parameter is about telling the user when the current view has changed.

bool close(Module m, bool bAskToSaveModule, bool bWarnForViewChanges);


/Anders

OK! Thanks. How did you know?

I see that parameter has no effect when the user's options are to not prompt when view changes are lost. but if the options are to prompt, setting that parameter false will bypass the prompt.

Since its inconvenient for long-running scripts to get prompted, I presume its prudent to routinely use this close, unless you can think of a good reason to do otherwise:

close(mod, false, false) // Close; don't prompt if unsaved; don't prompt for unsaved View changes

  • Louie

I see this bool parameter has the same function; don't bother to prompt:

bool load(Module,View,bool)